package com.student.liu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
public class Asset implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    @NotNull(message = "请传递资产ID")
    private Integer id;
    @NotBlank(message = "请传递资产编号assetNo")
    private String assetNo;
    @NotBlank(message = "请传递资产名asset")
    private String asset;
    @NotNull(message = "请传递部门departmentId")
    private Integer departmentId;
    @NotNull(message = "请传递资产价值nav")
    private Integer nav;
    @NotNull(message = "请传递资产数量number")
    private Integer number;
    private Date registertime;

    public Asset(Integer id,String assetNo,String asset,Integer departmentId, Integer nav,Integer number, Date registertime) {
        this.id = id;
        this.assetNo = assetNo;
        this.asset = asset;
        this.departmentId = departmentId;
        this.nav = nav;
        this.number = number;
        this.registertime = registertime;
    }

    public Asset(Integer id, String assetNo, String asset,  Integer departmentId, Integer nav, Integer number) {
        this.id = id;
        this.assetNo = assetNo;
        this.asset = asset;
        this.departmentId = departmentId;
        this.nav = nav;
        this.number = number;
    }

    public Asset(String assetNo, String asset, Integer departmentId, Integer nav, Integer number) {
        this.assetNo = assetNo;
        this.asset = asset;
        this.departmentId = departmentId;
        this.nav = nav;
        this.number = number;
    }

    public Asset() {
    }
}
